import request from '../utils/fetch'

export function getStoreGoodsList (data) {
  return request({
    url: '/store/goods/getStoreGoodsList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function getGoodsSort (data) {
  return request({
    url: '/api/goods/getGoodsSort',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function getGoodsSortByPid (data) {
  return request({
    url: '/api/goods/getGoodsSortByPid',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function saveGoods (data) {
  return request({
    url: '/store/goods/saveGoods',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}

export function doGoodsAdminTry (data) {
  return request({
    url: '/admin/goods/doGoodsAdminTry',
    method: 'post',
    requestBody: 'null',
    loading: true,
    data: data
  })
}
export function doStoreStockInOrOut (data) {
  return request({
    url: '/store/goods/doStoreStockInOrOut',
    method: 'post',
    requestBody: 'null',
    loading: true,
    data: data
  })
}
export function storeStockHistory (data) {
  return request({
    url: '/admin/goods/storeStockHistory',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function saveActive (data) {
  return request({
    url: '/store/active/saveActive',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
export function getGroupsGoodsList (data) {
  return request({
    url: '/api/active/getGroupsGoodsList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function addMoneyOff (data) {
  return request({
    url: '/store/active/addMoneyOff',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
export function storeMoneyOffList (data) {
  return request({
    url: '/store/active/storeMoneyOffList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function addMoneyOffChangeState (data) {
  return request({
    url: '/store/active/addMoneyOffChangeState',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function getStoreActiveGoodsList (data) {
  return request({
    url: '/store/active/getStoreActiveGoodsList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function activeChangeState (data) {
  return request({
    url: '/store/active/activeChangeState',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function getAdminCategoryList (data) {
  return request({
    url: '/admin/category/getAdminCategoryList',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function saveCategory (data) {
  return request({
    url: '/admin/category/saveCategory',
    method: 'post',
    requestBody: 'body',
    loading: true,
    data: data
  })
}
export function getGoodsCommentByGoodsId (data) {
  return request({
    url: '/admin/goods/getGoodsCommentByGoodsId',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function delGoodsComment (data) {
  return request({
    url: '/admin/goods/delGoodsComment',
    method: 'get',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function doCategoryEnable (data) {
  return request({
    url: '/admin/category/doCategoryEnable',
    method: 'post',
    requestBody: 'query',
    loading: true,
    params: data
  })
}
export function exportExcel (data) {
  return request({
    url: '/admin/excel/excel',
    method: 'post',
    requestBody: 'query',
    loading: true,
    params: data
  })
}











